package com.witsight.platform.model;

import java.util.HashMap;

/**   
 * 说明：业务bean用于从form传递给服务的扩展参数使用 , 基础Map关系的bean
 * @Title: BoEntity.java 
 * @Package com.witsight.platform.model 
 * @See: {@link HashMap} {@link IBaseObject}
 * Copyright: Copyright (c) 2017
 * Company:sany huax witsight team by product
 * @author: penght  
 * @date: 2017年9月18日 上午10:26:26 
 * @version: V1.0
 *
 */
public class BoEntity extends HashMap<String,Object> implements IBaseObject {
	private static final long serialVersionUID = 5576133605353530822L;
	private String boName = "BoEntity";
	
	public BoEntity() {
		super();
	}
	
	public BoEntity(String boName) {
		super();
		this.boName = boName;
	}
	
	public BoEntity(int initialCapacity, String boName) {
		super(initialCapacity);
		this.boName = boName;
	}
	
	public BoEntity(int initialCapacity) {
		super(initialCapacity);
	}
	
	public String toBoBame() {
		return this.boName;
	}
	
	/**
	 * 
	 * 说明：设置值
	 * @Title: set
	 * @See: {@link #put(String, Object)}
	 * @author penght
	 * @param key
	 * @param value 
	 * @date: 2017年9月18日 下午1:48:48
	 */
	public void set(String key, Object value) {
		super.put(key, value);
	}

	/**
	 * 
	 * 说明：取得对应的值
	 * 
	 * @Title: getValue
	 * @See: {@link #get(String)}
	 * @author penght
	 * @param name
	 *            key名称
	 * @return
	 * @date: Jun 18, 2017 12:25:41 PM
	 */
	@SuppressWarnings("unchecked")
	public <T> T getValue(String name) {
		return (T) this.get(name);
	}
    
	public String toString() {
		StringBuilder sb = new StringBuilder("");
		sb.append(this.boName).append(":").append(super.toString());
		return sb.toString();
	}
}
